var iFDU = require('../../utils/iFDU.js');
var WxParse = require('../../components/wxParse/wxParse.js');
var app = getApp()
Page({

  data: {
    config: app.config,
    globalData: app.globalData,
    specialSubject: {}
  },

  onLoad: function (options) {
    var that = this;
    var specialId = options.specialId;
    wx.showLoading({
      title: '加载中',
    });
    app.getUserInfo(function (globalData) {
      that.setData({
        globalData: globalData
      });
      
      iFDU.api.doGet(
        'carousel/getCarouselList',
        {
          userId: globalData.userId,
          iscarousel: 2,
          carouselId: specialId
        },
        function (data) {
          if (data && data.length > 0) {
            that.setData({
              specialSubject: data[0]
            });
            WxParse.wxParse('description', 'html', data[0].description, that, 5);
          }
          wx.hideLoading();
        }
      );
    });
  },

  onShow: function () {
  
  },

  close: function (e) {
    wx.navigateBack({

    })
  },

  onShareAppMessage: function () {
    
  }
})